<template>
  <el-dialog title="详细信息" :visible.sync="dialogVisible" class="dialog">
    <el-descriptions direction="vertical" :column="2" border v-if="info.id">

      <el-descriptions-item label="下注金额">{{ info.betAmount }}</el-descriptions-item>
      <el-descriptions-item label="下注">{{ info.betCommand }}</el-descriptions-item>
      <el-descriptions-item label="下注类别">{{ setBetType(info.betType)  }}</el-descriptions-item>
      <el-descriptions-item label="区块哈希">{{ info.blockHash }}</el-descriptions-item>
      <el-descriptions-item label="区块号">{{ info.blockNumber }}</el-descriptions-item>
      <el-descriptions-item label="最终开奖">{{ info.checkoutCommand }}</el-descriptions-item>
      <el-descriptions-item label="创建时间">{{ info.createTime }}</el-descriptions-item>
      <el-descriptions-item label="游戏类别"> {{ setGameType(info.gameType) }}</el-descriptions-item>
      <el-descriptions-item label="是否结算"> {{ info.isCheckout ? '是' : '否' }} </el-descriptions-item>
      <el-descriptions-item label="昵称">{{ info.nickName }}</el-descriptions-item>
      <el-descriptions-item label="用户id">{{ info.userId }}</el-descriptions-item>
      <el-descriptions-item label="盈利金额">{{ info.winAmount }}</el-descriptions-item>



    </el-descriptions>

    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
import { _isMobile } from '@/utils/index'
export default {
  data() {
    return {
      dialogVisible: false,
      info: {},
      isMobile: _isMobile
    }
  },

  methods: {
    show(e) {
      this.info = e
      console.log(e)
      this.dialogVisible = true
    },
    setBetType(id) {

switch (id) {
  case 'balance':
    return '余额投注'
    break;
  case 'kickback':
    return '佣金投注'
    break;
  default:
    break;
}
},
setGameType(id) {

switch (Number(id)) {
  case 0:
    return '普通单双'
    break;
  case 1:
    return '普通大小'
    break;
  case 2:
    return '一分单双'
    break;
  case 3:
    return '一分大小'
    break;
  default:
    break;
}
},
  }
}
</script>
